from django.conf.urls import url

from apps.users import views

urlpatterns = [
    # 显示注册页面
    url(r'^register/$', views.RegisterView.as_view(), name='register'),
    # 判断用户名是否重复usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/
    url(r'^usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$', views.UsernameCountView.as_view(), name='count'),
    # 判断手机号是否重复注册mobiles/(?P<mobile>1[3-9]\d{9})/count/
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view(), name='mobile'),
    # 登录页面
    url(r'^login/$', views.LoginView.as_view(), name='login'),
    # 退出
    url(r'^logout/$', views.LogoutView.as_view(), name='logout'),

]
